package com.book.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.book.entity.Book;
import com.book.service.BookService;

/**
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/book")
public class BookController {
	@Autowired
	private BookService bookService;
	
	//图书列表
	@RequestMapping("list")
	public String list(Model model) throws Exception {
		List<Book> bookList = bookService.queryBookList();
		model.addAttribute("bookList", bookList);
		return "bookList";
	}
}
